Image forming apparatus, control method therefor, and storage medium

ABSTRACT

This invention forms an image with the highest quality in an apparatus environment at that time by converting image data using an optimal luminance/density conversion table based on the read mode and the type of printhead. For this purpose, a conversion table used in copying is determined in accordance with the read mode (color read, gray scale read, or monochrome read) by a sheet scanner and the type of mounted printing cartridge, and an image is printed in accordance with density color image data converted based on the determined table.

FIELD OF THE INVENTION

The present invention relates to an image forming apparatus, a controlmethod therefor, and a storage medium.

BACKGROUND OF THE INVENTION

To read an original image and print it by a printer, read luminanceimage data must be converted into density image data.

An apparatus having a color image scanner can read an original as amonochrome image or gray scale image. The read image is desirablyprinted as a monochrome image or gray scale image. However, this imageis printed with respective color components in printing processing,which is not efficient printing.

Some printers can exchange printheads (cartridges integrated with inktanks) in accordance with a required printing quality. Also in thiscase, the performance of such printer cannot be enhanced unless printingdensity image data corresponding to the printhead is generated.

SUMMARY OF THE INVENTION

The present invention has been made to overcome the conventionaldrawbacks, and has as its object to provide an image forming apparatuscapable of converting image data using an optimal luminance/densityconversion table based on the read mode and the type of printhead,thereby forming an image with the highest quality in the apparatusenvironment, a control method therefor, and a storage medium.

To achieve the above object, for example, an image forming apparatusaccording to the present invention comprises the following arrangement.

That is, an image forming apparatus having

read means capable of reading an original image as a color image, and

printing means which can mount different printheads for discharging inkdroplets, and prints a read image is characterized by comprising

designation means for designating a read mode of the read means,

determination means for determining the type of mounted printhead, and

selection means for selecting a target conversion table from a pluralityof conversion tables on the basis of the read mode designated by thedesignation means and the type of printhead determined by thedetermination means,

wherein read image data is converted into printing image data on thebasis of the conversion table selected by the selection means, and theprinting image data is printed by the printing means.

Other features and advantages of the present invention will be apparentfrom the following description taken in conjunction with theaccompanying drawings, in which like reference characters designate thesame or similar parts throughout the figures thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the whole arrangement of an imageforming apparatus according to the first embodiment;

FIG. 2 is a plan view showing the console of the apparatus according tothe first embodiment;

FIG. 3 is a table showing a list of compression formats of the imageforming apparatus according to the first embodiment;

FIG. 4 is a table showing a list of color space representations of theimage forming apparatus according to the first embodiment;

FIG. 5 is a flow chart showing read initialization processing accordingto the first embodiment;

FIG. 6 is a flow chart showing read mode assignment processing intransmission according to the first embodiment;

FIG. 7 is a flow chart showing read mode assignment processing incopying according to the first embodiment;

FIG. 8 is a flow chart showing read mode assignment processing in PCscanning according to the first embodiment;

FIG. 9 is a view showing transition of read mode settings according tothe first embodiment;

FIG. 10 is a flow chart showing division of the line buffer area andswitching processing of the processing unit in transmission according tothe first embodiment;

FIG. 11 is a flow chart showing division of the line buffer area andswitching processing of the processing unit in copying according to thefirst embodiment;

FIG. 12 is a flow chart showing division of the line buffer area andswitching processing of the processing unit in PC scanning according tothe first embodiment;

FIG. 13 is a table showing a list of cartridge mounting states of theimage forming apparatus according to the first embodiment;

FIG. 14 is a flow chart showing cartridge mounting state detectionprocessing according to the first embodiment;

FIG. 15 is a table showing the conversion table list of the imageforming apparatus according to the first embodiment;

FIG. 16 is a flow chart showing switching processing between anoperation using the resource of a host computer and an operation notusing it according to the second embodiment;

FIG. 17 is a flow chart showing a processing sequence concerning outputof a read image according to the first embodiment;

FIG. 18 is a table showing an example of a page management table inmemory alternate reception using the resource of the host computer;

FIG. 19 is a graph showing the conversion characteristic of a conversiontable according to the first embodiment;

FIG. 20 is a graph showing the conversion characteristic of anotherconversion table according to the first embodiment;

FIG. 21 is a graph showing the conversion characteristic of stillanother conversion table according to the first embodiment;

FIG. 22 is a graph showing the conversion characteristic of stillanother conversion table according to the first embodiment;

FIG. 23 is a graph showing the conversion characteristic of stillanother conversion table according to the first embodiment;

FIG. 24 is a graph showing the conversion characteristic of stillanother conversion table according to the first embodiment;

FIG. 25 is a graph showing the conversion characteristic of stillanother conversion table according to the first embodiment;

FIG. 26 is a graph showing the conversion characteristic of stillanother conversion table according to the first embodiment; and

FIG. 27 is a graph showing the conversion characteristic of stillanother conversion table according to the first embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments of the present invention will be described indetail below with reference to the accompanying drawings.

<First Embodiment>

FIG. 1 is a block diagram showing the arrangement of an image formingapparatus (color facsimile apparatus) according to the first embodiment.

In FIG. 1, reference numeral 101 denotes a CPU for controlling the wholeapparatus; 102, a ROM which stores operation sequences (programs) andvarious pieces of information (including fonts) for the CPU 101; 103, awork RAM for storing variables used for execution by the CPU 101 andinformation registered and set by the operator, and is constituted by anSRAM in the first embodiment; and 104, an image memory for storing imagedata and is constituted by a DRAM or the like.

Reference numeral 105 denotes an image processor for performing edgeemphasis, luminance/density conversion, and multilevel/binary conversionfor read image data under the control of the CPU 101; and 106, a consolefor setting the mode and displaying the state in this apparatus.

Reference numeral 107 denotes a printing controller for convertingbinary data into a printing native command; and 108, acompression/decompression unit for compressing/decompressing image databy JPEG, JBIG, or the like.

Reference numeral 109 denotes a PC interface for controllingcommunication with an information processing apparatus such as apersonal computer; and 110, an interface for allowing bidirectionalcommunication. This embodiment adopts a bidirectional interfacecomplying with the IEEE P1284. However, the interface 110 is not limitedto this, and may be an interface complying with the IEEE P1394 or a USB.Alternatively, the interface 110 may be a network interface.

Reference numeral 111 denotes a read controller for controlling a motorand the like in read; and 112, a sheet scanner. In this embodiment, thesheet scanner 112 is a sheet through type scanner, and is made up of aCS/CCD image sensor, read motor, and the like. The sheet scanner 112 isof a sheet through type, but may be of a flat bed type. The actual readresolution of the sheet scanner 112 is 300 dpi. By thinning orinterpolating scanning lines, data having different resolutions of 200dpi and 360 dpi are generated. This processing is done by the imageprocessor 105.

Reference numeral 113 denotes a line buffer used when, e.g., image dataoutput from the image processor is transferred to the image memory.

Reference numeral 114 denotes a printer interface for analyzing data ofa printing description language sent from a host computer or the like,and converting the data into image data; and 115, a printer for printinga read image, received image, file data, or the like on a printingsheet. The actual printing resolution of the printer 115 in thisembodiment is 360 dpi.

Reference numeral 116 denotes a communication controller forcommunicating with another communication device via a communication line(public line) 119.

Reference numeral 117 denotes a timepiece unit for measuring the timeinterval or the like.

Reference numeral 118 denotes a host computer capable of setting theoperation of the image forming apparatus, monitoring its state, andmanaging image data read by or data received by the image formingapparatus.

FIG. 2 is a plan view showing the console 106 of the image formingapparatus. In FIG. 2, reference numeral 201 denotes a ten-key pad havingten numerical keys used for input of a telephone number in a call orvarious settings; 202, a display which displays the state informationand operation state of the apparatus, and is constituted by a liquidcrystal display; 203, one-touch keys used for a call by a telephonenumber or various settings; and 204, a start key for starting copying,communication, scanning, and the like.

Reference numeral 205 denotes a color/gray scale/monochrome switchingkey for switching between color read, gray scale read, and monochromeread. When this key is not pressed (i.e., default), monochrome read isnormally set. The key is pressed once to switch the read mode to grayscale read, twice to switch it to color read, and three times to switchit to monochrome read. Every time the key is pressed, the read mode isperiodically switched.

Reference numeral 206 denotes a resolution key for designating switchingof the read resolution. The resolution to be switched includes astandard mode, fine mode, and super fine mode defined by ITU-T T.30.When this key is not pressed, the standard mode is set. The key ispressed once to switch the read resolution to the fine mode, twice toswitch it to the super fine mode, and three times to switch it to thestandard mode. Every time the key is pressed, the read resolution iscyclically switched.

Reference numeral 207 denotes a hook key for capturing or releasing aline; 208, a stop key for interrupting each operation or cancellingregistration or the like; 209, a redial/pause key for redialing atelephone number or inserting a pause between calls; and 210, anabbreviation dial key used to call a registered telephone number byabbreviated procedures.

Reference numeral 211 denotes a reception mode switching key forswitching the facsimile reception mode; 212, a copy key for changing themode to a copy mode; 213, a function key for changing the mode tovarious setting modes of the image forming apparatus; 214, a set key fordefining various settings; and 215, a recovery key for designating errorcancellation of the printing unit.

Reference numeral 216 denotes an operation indicator lamp for informingthe operator which of color, gray scale, or monochrome modes is set as aread mode; and 217, an error indicator lamp for representing whether anerror occurs in each unit of the image forming apparatus (lamp-ON/OFFoperation).

This apparatus is integrally constituted by the communicationcontroller, the sheet scanner, and the printer. However, the presentinvention is not limited to this structure. Alternatively, the scanner,the printer, and the communication unit may be separately connected to apersonal computer, and controlled by the personal computer.

FIG. 3 is a table showing a list of compression formats of the imageforming apparatus. This image forming apparatus has seven compressionformats, i.e., RAW (non-compression), MR+RAW (MRcompression+non-compression), MH compression, MR compression, MMRcompression, JBIG compression, and JPEG compression. The image formingapparatus switches these compression formats in accordance with thefacsimile operation mode to read image data.

FIG. 4 is a table showing a list of representable color space formatswhen the image forming apparatus performs color/gray scale read in theJPEG compression format. The color space formats include three formats,i.e., None (no color space representation), Lab format, and YCbCrformat. The image forming apparatus selects one of these color spacerepresentations in accordance with the facsimile operation mode to readimage data.

Read operation of the image forming apparatus having the abovearrangement according to the first embodiment will be explained withreference to the flow chart in FIG. 5.

Whether an original is set is checked by the original sensor (not shown)of the sheet scanner 112 (step S501). If YES in step S501, whether theread mode is designated by the color/gray scale/monochrome switching key205 is checked (step S502). At the start of this operation, the operatorhas designated one of color, gray scale, and monochrome read modes withthe console. If the operator has not pressed the key, monochrome read isnormally set. The operator presses the key 205 once to switch the readmode to gray scale read, twice to switch it to color read, and threetimes to switch it to monochrome read. Every time the key 205 ispressed, the read mode is cyclically switched. The apparatus designatesthe read mode by this operation. However, the present invention is notlimited to this, and may adopt different keys for designating therespective read modes. The read mode is designated by the color/grayscale/monochrome switching key 205. However, the present invention isnot limited to this. Alternatively, for example, the PC may designateone of color, gray scale, and monochrome read modes when the hostcomputer 118 designates read of an image on the scanner via thebidirectional I/F 110.

If YES in step S502, the designated read mode is stored (step S503).

If the start key is determined not to be pressed, whether a destinationhas been input with a key such as the ten-key pad 201, one-touch key203, redial key 209, or abbreviation dial key 210 is checked (stepS504). If YES in step S504, the flow jumps to processing (FIG. 6) ofFAX-transmitting by the communication controller 116 an image read bythe sheet scanner 112. Whether the copy key 212 has been pressed ischecked (step S505). If YES in step S505, the flow jumps to processing(FIG. 7) of printing by the printer 115 an image read by the sheetscanner 112. If NO in step S505, whether the start key 204 has beenpressed is checked (step S506). If NO in step S505 and YES in step S506,the flow jumps to the PC-SCAN mode, i.e., processing (FIG. 8) oftransferring an image read by the image forming apparatus to the hostcomputer 118. If NO in step S506, the processing ends.

Read processing in transmission will be described with reference to FIG.6. This processing is executed when the operation of the image formingapparatus is switched to the transmission mode by operator'smanipulation.

Whether the read mode stored in step S503 (the color/grayscale/monochrome operation indicator lamp 216 is turned on based on theread mode information) corresponds to color transmission is checked(step S601). If YES in step S601, JPEG compression (comp_mode=JPEG) asan image data format complying with the ITU-T recommendations is set(step S602), and the color space representation is set to the Lab format(color_rep=Lab) (step S603). Data read by the sheet scanner 112undergoes image processing by the image processor 105 for edge emphasis,density conversion, or the like set with the console 106. Then, theprocessed data is transferred to the line buffer 113. Image datacompressed by the compression/decompression unit 108 is accumulated inthe image memory 104, and transmitted by the communication controller116.

If NO in step S601, whether the read mode corresponds to gray scaletransmission is checked (step S603′). If YES in step S603′, the imagedata format is set to JPEG compression (comp_mode=JPEG) (step S604), andthe color space representation is set to the YCbCr format(color_rep=YCbCr) (step S605).

The YCbCr format as color space representation is employed even for thegray scale because transmission dedicated for a single-color-level imageis not prepared and color image transmission is used instead.

If NO in step S603′, i.e., the read mode corresponds to monochrometransmission, the image data format is set to MRcompression+non-compression (comp_mode=MR+RAW) (step S606), and no colorspace representation is set (color_rep=None) (step S607). Then, the flowshifts to processing in FIG. 10.

The color space representation in the Lab format will be described.

The Lab format is a color image format necessary for transmitting animage by the JPEG scheme recommended by ITU-T T.30.

(1) A reference white point (X0, Y0, Z0) for a D50 light source isnormalized into 8-bit values for respective colors. X0, Y0, and Z0 forthe D50 light source are 96.422, 100.000, and 85.521, respectively. Solong as the XYZ range in transformation into an Lab signal is expressedby 8 bits ranging from 0 to 255, X0, Y0, and Z0 are multiplied by255/100 and normalized to match X0, Y0, and Z0 with each other. LettingX0′, Y0′, and Z0′ be the normalized X0, Y0, and Z0 values, X0′, Y0′, andZ0′ are given by

X 0′=X 0*255/100=96.422*2.55=245.876

Y 0′=Y 0*255/100=100.000*2.55=255.000

 Z 0′=Z 0*255/100=85.521*2.55=218.079

(2) X0′, Y0′, and Z0′ obtained in (1) are reflected on an RGB→XYZtransformation matrix for the D50 light source. R, G, and B componentsread with the D50 light source are transformed into X, Y, and Zcomponents:

X=A 11*R+A 12*G+A 13*B

Y=A 21*R+A 22*G+A 23*B

Z=A 31*R+A 32*G+A 33*B

(where A11 to A33 are RGB→XYZ transformation coefficients for the D50light source.)

In Lab transformation, the ratios of the reference white point valuesX0′, Y0′, and Z0′ corresponding to X, Y, and Z obtained by the aboveequations are important. That is, X/X0′, Y/Y0′, and Z/Z0′ (0≦X/X0′≦1,0≦Y/Y0′≦1, and 0≦Z/Z0′1) must be obtained.

For this purpose, the above equations are rewritten into:

X/X 0′=(A 11/X 0′)*R+(A 12/X 0′)*G+(A 13/X 0′)*B  (2-1)

Y/Y 0′=(A 21/Y 0′)*R+(A 22/Y 0′)*G+(A 23/Y 0′)*B  (2-2)

Z/Z 0′=(A 31/Z 0′)*R+(A 32/Z 0′)*G+(A 33/Z 0′)*B  (2-3)

In this case, R, G, and B components read with the D50 light source havebeen exemplified. In practice, since an image read by the sheet scanner112 is not read with the D50 light source, R, G, and B components readby the sheet scanner 112 must be transformed into R, G, and B componentsread with the D50 light source in accordance with the characteristics ofa sensor and light source used by the sheet scanner 112. Letting R′, G′,and B′ be output signals from the sheet scanner 112, and B11 to B33 becoefficients for transformation into outputs corresponding to the D50light source,

R=B 11*R′+B 12*G′+B 13*B′

G=B 21*R′+B 22*G′+B 23*B′

B=B 31*R′+B 32*G′+B 33*B′

(3) X/X0′, Y/Y0′, and Z/Z0′ are clipped to fall within 0≦X/X0′≦1,0≦Y/Y0′≦1, and 0≦Z/Z0′≦1. Ideally, X/X0′, Y/Y0′, and Z/Z0′ take valuesfalling within the range of 0 to 1 from equations (2-1), (2-2), and(2-3). A value smaller than 0 owing to a calculation error is clipped to0, and a value larger than 1 is clipped to 1.

(4) Lab transformation is performed using the results of (3).

Transformation equations for calculating values L, a, and b from X/X0′,Y/Y0′, and Z/Z0′ are given by equations (4-1), (4-2), and (4-3). Notethat when the values X/X0′, Y/Y0′, and Z/Z0′ are 0.008856 or less, lightcomponents given by the cube roots of equations (4-1), (4-2), and (4-3)are replaced by 7.787*(X/X0′)+(16/116), 7.787*(Y/Y0′)+(16/116), and7.787*(Z/Z0′)+(16/116).

L=116*(Y/Y 0′)^(1/3)−16  (4-1)

 a=500*{(X/X 0′)^(1/3)−(Y/Y 0)^(1/3)}  (4-2)

b=200*{(Y/Y 0′)^(1/3)−(Z/Z 0)^(1/3)}  (4-3)

In the first embodiment, the cube roots are calculated with reference toa table, so that whether the values X/X0′, Y/Y0′, and Z/Z0′ are 0.008856or less is not determined on the program.

(5) The transformed signals L, a, and b are clipped to fall within0≦L≦100, −85≦a≦85, and −75≦b≦125. The signals L, a, and b are normalizedinto 8 bits ranging from 0 to 255.

The signals L, a, and b calculated by equations (4-1), (4-2), and (4-3)are clipped to comply with the T.42 recommendation, and the clippedsignals are normalized into 8-bit signals ranging from 0 to 255 tocomply with the JPEG baseline system. Letting L′, a′, and b′ be thenormalized L, a, and b signals,

L′=L*(255/100)  (5-1)

a′=a*(255/170)+128  (5-2)

b′=b*(255/200)+96  (5-3)

The signals L′, a′, and b′ obtained by these equations undergo JPEGcoding processing, and are stored in the image memory 104.

As described above, transformation of the color space representationinto the Lab format is very complicated. Using this color spacerepresentation every time in addition to transmission to a destinationfacsimile in the JPEG format overloads the apparatus. For this reason,it is desirable not to use the Lab format except for color facsimiletransmission.

The color space representation in the YCbCr format will be explained.

The YCbCr format is attained by multiplying read R, G, and B images bytransformation coefficients C11 to C33.

X=C 11*R+C 12*G+C 13*B

Y=C 21*R+C 22*G+C 23*B

Z=C 31*R+C 32*G+C 33*B

In this manner, the color space representation in the YCbCr format ismuch simpler than that in the Lab format. Hence, the YCbCr format can bepreferably used except for facsimile transmission of a color image thatis defined by the ITU-T recommendation.

FIG. 7 is a flow chart showing read operation of the image formingapparatus in copying.

The operation of the image forming apparatus is switched to copying byoperator's manipulation. The read mode stored in step S503 (thecolor/gray scale/monochrome operation indicator lamp 216 is turned onbased on the read mode information) is checked (step S701) to determinewhether the read mode is color copying. If YES in step S701, whethercolor copying is memory copying or direct copying is determined from thenumber of copies designated with the console 106 (step S702). If thedesignated number of copies is two or more, memory copying isdetermined, the image data format is set to JPEG compression(comp_mode=JPEG) (step S703), and the color space representation is setto the YCbCr format (color_rep=YCbCr) (step S704). Then, the flowadvances to processing shown in FIG. 11.

In memory copying, images are compressed to accumulate a larger numberof images in the memory because images are output after all the imagesare read in memory copying. The color space representation is set to theYCbCr format because the Lab format increases the processing load, andthe color compatibility with a partner apparatus need not be consideredin copying, compared to FAX transmission.

In memory copying, data read by the sheet scanner 112 undergoes imageprocessing by the image processor 105 for edge emphasis, densityconversion, or the like set with the console 106. The processing resultis transferred to the line buffer 113, and compressed by thecompression/decompression unit 108. The compressed image data isaccumulated in the image memory 104, and transferred to the printer 115where the data is copied. If the designated number of copies is one,direct copying is determined, the compression format is set tonon-compression (comp_mode=RAW) (step S704), and no color spacerepresentation is set (color_rep=None) (step S705). Then, the flowadvances to processing shown in FIG. 11. In direct copying, a raw imageis processed without any compression in order to quickly print a readimage and minimize the idle time for printing a copy image with respectto the user. The image is copied similarly to memory copying. Theoperation of the compression/decompression unit 108 in direct copying isonly to simply transfer data in the line buffer 113 to the image memory104.

If NO in step S701, whether the read mode is gray scale read is checked(step S706). In gray scale read, the operation is the same as that incolor copying, and a description thereof will be omitted (steps S707 toS711).

If NO in step S706, i.e., the read mode is monochrome, whether thiscopying is memory copying or direct copying is determined from thenumber of copies designated with the console 106 (step S712). If thedesignated number of copies is two or more, memory copying isdetermined, the compression format of image data in memory copying isset to MR compression +non-compression (comp_mode=MR+RAW) (step S713),and no color space representation is set (color_rep=None) (step S714).Then, the flow advances to processing shown in FIG. 11. The MRcompression+non-compression format means a mode in which if a 1-lineimage compressed by the MR scheme is smaller than the image data amountof 1-line raw image, the image is compressed by the MR format, and ifthe image is larger, the image is stored as a raw image in the memory.

If the designated number of copies is one, direct copying is determined,the compression format is set to non-compression (comp_mode=RAW) (stepS704′), and no color space representation is set (color_rep=None) (stepS705). The flow shifts to processing in FIG. 11.

FIG. 8 shows a read processing sequence in a mode (to be referred to asPC scanning hereinafter) in which the image forming apparatus operatesas an image scanner connected to the host computer 118. In other words,the operation of the image forming apparatus is switched to PC scanningby operator's manipulation.

Whether a scanning request from the PC serving as the host computer 118designates color scanning is checked (step S801). If YES in step S801,whether the JPEG format is designated as a compression format is checked(step S802). If YES in step S802, the compression format of image datais set to JPEG compression (comp_mode=JPEG) (step S803), and the colorspace representation is set to the YCbCr format (color_rep=YCbCr) (stepS804). After that, the flow shifts to processing shown in FIG. 12.

Data read by the sheet scanner 112 undergoes image processing by theimage processor 105 in accordance with an instruction from the hostcomputer 118, and is transferred to the line buffer 113 and compressedby the compression/decompression unit 108. The compressed image data isaccumulated in the image memory 104, and transferred to the hostcomputer 118 via the bidirectional interface 110.

If NO in step S802, the compression format is set to MRcompression+non-compression (comp_mode=MR+RAW) (step S805), and no colorspace representation is designated (step S806). Then, the flow shifts toprocessing shown in FIG. 12. As the compression format, two modes, JPEGand MR+non-compression modes, are prepared for the following reason. TheJPEG mode cannot completely reconstruct read image information becauseof irreversible coding, but can achieve high compression efficiency. Tothe contrary, the MR+non-compression mode cannot achieve highcompression efficiency, but can completely reconstruct read imageinformation because of reversible coding. These compression modes can beselectively used in accordance with operator tastes.

If NO in step S801, whether gray scale read is designated is checked(step S807). In gray scale scanning, the same operation as in colorscanning is done (steps S808 to S812).

In monochrome scanning, the image data format is always set to MRcompression+non-compression (comp_mode=MR+RAW) (step S813), and no colorspace representation is set (color_rep=None) (step S814). The flowadvances to processing shown in FIG. 12.

FIG. 9 shows the operations of the indicator lamps of the color/grayscale/monochrome switching key 205 and color/gray scale/monochromeoperation indicator lamp 216 of the image forming apparatus. By pressingthe color/gray scale/monochrome switching key 205, the ON state of theLED changes in the order of color (read_type=COLOR)→gray scale(read_type=GRAYSCALE)→monochrome (read_type=MONO), and the read modechanges. When the PC 118 designates a read mode, the indicator lamp ofthis read mode is turned on regardless of the press of the color/grayscale/monochrome switching key 205.

FIG. 10 is a flow chart showing division of the line buffer area by anoptimal line buffer size and switching of the processing unit inaccordance with the read image data format of the image formingapparatus in transmission.

The read mode is determined by referring to a stored read mode (stepS503).

If the read mode is color read (read_type=COLOR) (step S1001), theoriginal size is set to A4 (paper_size=A4) regardless of an actualoriginal size (step S1002), and the 1-line data size is set to 1,728bytes (linebuf_size=1728) (step S1003). This data size is defined by theITU-T recommendations. Because of color read, alloc_cnt=3 is set toensure three buffers for R, G, and B colors at once (step S1004). Thestandard defines JPEG as a data compression format for colortransmission. In this apparatus, however, block_cnt=16 is set to performprocessing in units of 16 lines at a JPEG sub-sampling ratio of 4:1:1(step S1005).

The line buffer area (linebuf_area_size: the size of the line bufferarea) is divided by an optimal line buffer size which can be effectivelyused, and the number of line buffers (linebuf_num) is obtained (stepS1006). Thereafter, the flow shifts to processing shown in FIG. 17.

In this case, for example, one color component requires 16 lines, thenumber of color components is three, and thus the total of 48 lines mustbe ensured. Since the 1-line capacity is 1,728 bytes (one byte for onepixel), the necessary capacity is

48×1,728=82,944 bytes

At least two blocks require this capacity in terms of the structure ofthe compression/decompression unit 108, so that the size of the linebuffer area must be large enough to ensure at least two blocks. 82,944×2bytes are regarded as a processing unit (=optimal line buffer size whichcan be effectively used). The number of processing units which can beensured in the line buffer 113 is obtained by dividing the area size(linebuf_area_size) of the line buffer 113 by the quotient (integerpart). Assuming that n be the quotient of this division, n areas can beused for processing of the image processor 105 and processing of thecompression/decompression unit 108 for image data obtained by reading animage. This enables utilizing the limited line buffer 113 at maximum toincrease the processing throughput. Note that this apparatus ensuresabout 500 KB as the size of the line buffer area.

If NO in step S1001, whether the read mode is gray scale read is checked(step S1007). If read_type=GRAYSCALE, the original size is set to A4(paper_size=A4) regardless of an actual original size (step S1008), andthe 1-line data size is set to 1,728 bytes (linebuf_size=1728) (stepS1009), similar to color read. Since the gray scale uses a single color,the number of line buffers ensured at once is set to 1 (alloc_cnt=1)(step S1010). This apparatus uses JPEG even for gray scale transmission,and executes data processing in units of 8 lines (block_cnt=8) (stepS1011). The line buffer area (linebuf_area_size: the size of the linebuffer area) is divided by an optimal line buffer size which can beeffectively used, the number of line buffers (linebuf_num) is obtained(step S1006), and the flow shifts to processing shown in FIG. 17.

Processing in step S1006 has been described above, and the line buffer113 can be used at maximum.

If NO in step S1007, i.e., the read mode is monochrome read(read_type=MONO), the following processing is executed.

A state from an original size sensor is detected (steps S1012 and S1017)to acquire the current original size (paper_size=A3/B4/A4) (steps S1013,S1018, and S1020). Since the ITU-T standard defines one line size of animage in accordance with the original size, a line buffer sizecorresponding to the original size is set (linebuf_size=304/256/216)(steps S1014, S1019, and S1021). Because of monochrome read, the numberof buffers ensured at once is set to 1 (alloc_cnt=1) (step S1015), thedata compression format is MR+non-compression (comp_mode=MR+RAW), andthe data processing unit is also set to 1 (block_cnt=1) (step S1016).The line buffer area (linebuf_area_size: the size of the line bufferarea) is divided by an optimal line buffer size which can be effectivelyused, the number of line buffers (linebuf_num) is obtained (step S1006),and the flow shifts to processing shown in FIG. 17.

Note that the first embodiment has exemplified only equal-magnificationtransmission, but reduction transmission and enlargement transmissioncan be similarly performed.

FIG. 11 is a flow chart showing division of the line buffer area by anoptimal line buffer size and switching of the processing unit inaccordance with the read image data format of the image formingapparatus in copying.

The read mode is determined by referring to read_type (step S1101). Ifthe read mode is color read (read_type=COLOR), the original size is setto A4 (paper_size=A4) regardless of an actual original size (stepS1102). Because of color read, alloc_cnt=3 is set to ensure threebuffers for R, G, and B colors at once (step S1103). Whether the copyingoperation is memory copying or direct copying is checked. This apparatususes JPEG as a data compression format for memory copying, and thenon-compression format for direct copying. If a request from the currentoperator designates memory copying (comp_mode=JPEG) (step S1104), theline processing unit is set to 16 (block_cnt=16) (step S1106), and theline buffer size is set to 1,728 bytes (linebuf_size=1728) (step S1105).If the request designates direct copying (comp_mode=RAW), the lineprocessing unit is set to 1 (block_cnt=1) (step S1109), and the linebuffer size is set to 3,060 bytes (linebuf_size=3060) (step S1108).

The 1-line buffer size for direct copying is set to 3,060 bytes toensure a capacity corresponding to a read resolution of 200 dpi infacsimile transmission or the like in order to realize high-qualityprinting using the printing resolution (360 dpi) of the printer 115 atmaximum in direct copying. That is, the read sensor has a resolution of300 dpi, and read image data is interpolated by the image processor toobtain data at 360 dpi, which corresponds to the above size.

The line buffer area (linebuf_area_size: the size of the line bufferarea) is divided by an optimal line buffer size which can be effectivelyused, and the number of line buffers (linebuf_num) is obtained (stepS1007). Then, the flow shifts to processing shown in FIG. 17.

Note that processing in step S1107 is substantially the same as that instep S1006 of FIG. 10, and the capacity-limited line buffer 113 is usedat maximum.

If the read mode is gray scale read (read_type=GRAYSCALE) (step S1110),the original size is set to A4 (paper_size=A4) regardless of an actualoriginal size (step S1111), and alloc_cnt=1 is set to ensure the bufferat once (step S1112), similar to color read. For memory copying, theline buffer size is set to 1,728 bytes (linebuf_size=1728) (step S1114),and the line processing unit is set to 8 (block cnt=8) (step S1115). Fordirect copying, the line buffer size is set to 3,060 bytes(linebuf_size=3060) (step S1116), and the line processing unit is set to1 (block_cnt=1) (step S1117). Since the gray scale uses a single color,the number of line buffers ensured at once is set to 1 (alloc_cnt=1).The line buffer area (linebuf_area_size: the size of the line bufferarea) is divided by an optimal line buffer size which can be effectivelyused, the number of line buffers (linebuf_num) is obtained (step S1107),and the flow shifts to processing shown in FIG. 17.

If the read mode is monochrome read (read_type=MONO), a state from theoriginal size sensor is detected (steps S1118 and S1125) to acquire thecurrent original size (paper_size=A3/B4/A4) (steps S1119 and S1126).Then, whether the copying operation is memory copying or direct copyingis checked. This apparatus uses the MR+non-compression format as a datacompression format for memory copying, and the non-compression formatfor direct copying (steps S1127, S1129, and S1131). If a request fromthe current operator designates memory copying (comp_mode=MR+RAW), theline buffer size is set to 304/256/216 bytes (linebuf_size=304/256/216)(steps S1121, S1128, and S1132). If the request designates directcopying (comp_mode=RAW), the line buffer size is set to 536/452/382bytes (linebuf_size=536/452/382) (steps S1124, S1129, and S1133).Because of monochrome read, the number of buffers ensured at once is setto 1 (alloc_cnt=1) (step S1122), and the line processing unit is set to1 (block cnt=1) (step S1123). The line buffer area (linebuf_area_size:the size of the line buffer area) is divided by an optimal line buffersize which can be effectively used, the number of line buffers(linebuf_num) is obtained (step S1107), and the flow shifts toprocessing shown in FIG. 17.

Note that the first embodiment has exemplified only equal-magnificationcopying, but reduction copying and enlargement copying can be similarlyperformed.

FIG. 12 is a flow chart showing division of the line buffer area by anoptimal line buffer size and switching of the processing unit inaccordance with the read image data format of the image formingapparatus in PC scanning.

In PC scanning, the PC designates the read image range (paper_size)(step S1201), the resolution (step S1202), the read mode (read_type),and the image data compression format (comp_mode). In accordance withthis designation, the number of buffers ensured at once (alloc_cnt) andthe line processing unit (block_cnt) are selected.

If the read mode is color scanning (read_type=COLOR) (step S1203),alloc_cnt=3 is set to ensure three buffers for R, G, and B colors atonce (step S1204). The data compression format (comp_mode) is determined(step S1205), and if it is the JPEG format, the line processing unit isset to 16 (block_cnt=16); otherwise, the data compression format isdetermined to be the MR compression+non-compression format(comp_mode=MR+RAW), and the line processing unit is set to 1(block_cnt=1) (step S1209). As the compression format, two modes, JPEGand MR+non-compression modes, are prepared for the following reason. TheJPEG format cannot completely reconstruct read image information becauseof irreversible coding, but can achieve high compression efficiency. Tothe contrary, the MR+non-compression mode cannot achieve highcompression efficiency, but can completely reconstruct read imageinformation because of reversible coding. These compression modes can beselectively used in accordance with operator tastes.

If the read mode is gray scale scanning (read_type=GRAYSCALE) (stepS1210), since the gray scale uses a single color, the number of linebuffers ensured at once is set to 1 (alloc_cnt=1) (step S1211). If thecompression format is the JPEG format (comp_mode=JPEG) (step S1212), theline processing unit is set to 8 (block_cnt=8) (step S1213); otherwise,the compression format is determined to be the MRcompression+non-compression format (comp_mode=MR+RAW), and the lineprocessing unit is set to 1 (block_cnt=1) (step S1216).

If the read mode is monochrome scanning (read_type=MONO) (step S1210),the data compression format is always determined to be the MRcompression+non-compression format (comp mode=MR+RAW). The number ofline buffers ensured at once is set to 1 (alloc_cnt=1) (step S1215), andthe line processing unit is set to 1 (block_cnt=1) (step S1216).

After all the values are determined, a line buffer size (linebuf_size)optimum for the designated read mode is calculated (step S1207), and theline buffer area is divided to be effectively used (step S1208). Afterthat, the flow shifts to processing in FIG. 17.

Note that the first embodiment has exemplified only equal-magnificationscanning, but reduction scanning and enlargement scanning can besimilarly performed.

As the data compression format, this apparatus adopts the JPEG formatand the non-compression format for color/gray scale read, and the MRcompression+non-compression format and the non-compression format formonochrome read. However, the present invention is not limited to them.

FIG. 13 shows a list of states of a printing member (cartridgeintegrally constituted by an ink tank and a cartridge) mounted on theprinter 115. The printer 115 (this embodiment employs a method ofdischarging ink droplets by heat energy) can print data by mounting adetachable printing member on a printing unit (not shown). The printingmember mountable on the image forming apparatus includes five types ofprinting members, i.e., a monochrome cartridge (prt_head_sts=MONO), acolor cartridge (prt_head_sts=COLOR), a size-changeable color cartridge(prt_head_sts=COLOR_E), a photocartridge (prt_head_sts=PHOTO), and asize-changeable photocartridge (prt_head_sts=PHOTO_E).

The monochrome cartridge is an ink cartridge for a single black ink. Thecolor cartridge is integrally constituted by general Y, M, C, and K inktanks and a head, and is a general-purpose cartridge. Thesize-changeable color cartridge can switch ink droplets between twosizes, large and small sizes, in order to further increase the graylevel reproducibility. The photocartridge has two tanks, dark- andlight-ink tanks, for each of M and C color components to achieve highcolor reproducibility. The size-changeable photocartridge can dischargelarge and small ink droplets in addition to the feature of thephotocartridge. Note that the types of cartridges are not limited tothis example, and another type of cartridge such as a special colorcartridge may be used.

The printing unit comprises a sensor for detecting the type of cartridge(not shown), and can detect the type of mounted cartridge by thissensor. Detectable states are six states, i.e., non-mounting of thecartridge (prt_head_sts=NONE), mounting of the monochrome cartridge(prt_head_sts=MONO), mounting of the color cartridge(prt_head_sts=COLOR), mounting of the size-changeable color cartridge(prt_head_sts=COLOR_E), mounting of the photocartridge(prt_head_sts=PHOTO), and mounting of the size-changeable photocartridge(prt_head_sts=PHOTO_E). The monochrome cartridge holds only black ink,and is dedicated to monochrome printing. The color cartridge holds fourinks, cyan, magenta, yellow, and black inks, and can be used for bothcolor and monochrome printing operations. The size-changeable colorcartridge holds four inks, cyan, magenta, yellow, and black inks, canchange the ink droplet size between two sizes, large and small sizes, indischarging ink, and can be used for both color and monochrome printingoperations. The photocartridge holds six inks, cyan (dark), cyan(light), magenta (dark), magenta (light), yellow, and black inks, and isdedicated to color printing. The size-changeable photocartridge holdssix inks, cyan (dark), cyan (light), magenta (dark), magenta (light),yellow, and black inks, can change the ink droplet size between twosizes, large and small sizes, in discharging ink, and is dedicated tocolor printing.

FIG. 14 is a flow chart showing detection of the mounting state of thecartridge on the printing unit. This processing is periodicallyactivated independently of the main routine.

Whether the mounted cartridge is a monochrome cartridge is checked (stepS1401). If YES in step S1401, prt_head_sts=MONO (step S1402) is set, andthe flow ends. If NO in step S1401, whether the mounted cartridge is acolor cartridge is checked (step S1403). If YES in step S1403, whetherthe color cartridge is a size-changeable cartridge is checked (stepS1404). If YES in step S1404, prt_head_sts=COLOR_E is set (step S1405);or if NO, prt_head_sts=COLOR is set (step S1406), and the flow ends. IfNO in steps S1401 and S1403, whether the mounted cartridge is aphotocartridge is checked (step S1407). If YES in step S1407, whetherthe photocartridge is a size-changeable cartridge is checked (stepS1408). If YES in step S1408, prt_head_sts=PHOTO_E is set (step S1409);or if NO, prt_head_sts=PHOTO is set (step S1410), and the flow ends. IfNO in step S1407, no cartridge is determined to be mounted,prt_head_sts=NONE is set (step S1411), and the flow ends.

FIG. 15 shows a conversion table list (luminance/density conversiontables in the first embodiment) selected by the type of cartridgemounted on the printing unit and the operation state. The conversiontable is stored in the ROM 102, and target table data is selected andused.

Examples of the conversion table will be described with reference toFIGS. 19 to 27.

FIG. 19 is a table showing a linear RGB output with respect to an RGBinput. That is, a read image is substantially directly output throughlog transformation. This table is used for JPEG compression and editingon the PC side upon output.

FIGS. 20 to 23 show luminance/density conversion tables corresponding tothe types of color printing cartridges.

FIG. 24 shows a gray scale conversion table. Also in the gray scale, aread image is substantially directly output through log transformationin FAX transmission or transfer to the PC. In copying, logtransformation must be executed, and thus a conversion table having thesame table contents as in FIG. 25 is set.

FIG. 25 shows a monochrome transmission/copying conversion table (simplebinarization processing). In this case, halftone reproducibility neednot be considered, so that a conversion table using a linear function isset.

FIG. 26 shows a monochrome transmission conversion table (pseudohalftone processing). In this case, a conversion table using a nonlinear(log) function is set in consideration of halftone reproducibility.

FIG. 27 shows a monochrome copying conversion table (pseudo halftoneprocessing). Also in this case, a conversion table using a nonlinear(log) function is set in consideration of halftone reproducibility.

Monochrome scanning can basically use the same table as the monochrometransmission conversion table.

Since the color and density reproducibilities change in accordance withthe type of cartridge, this apparatus must have a conversion tablecorresponding to a density designated in read. However, the type ofcartridge need not be considered in read for transferring a read imageto the PC or read for transmitting a FAX image.

Specifically, an optimal conversion table is selected in accordance withparameters such as the read mode, FAX transmission, PC scanning,copying, and a designated read density (in this image apparatus, theread density of the sheet scanner 112 can be designated from threedensities, high, normal, and low densities, by the console 106 or thehost computer). More specifically, a conversion table is selected asfollows.

When the operation state is color transmission or color scanning, aconversion table “color” is selected regardless of the cartridgemounting state and the read density.

When the operation state is color copying, and no cartridge is mounted(prt_head_sts=NONE) or a monochrome cartridge is mounted, color copyingcannot be performed, and a conversion table cannot be selected. If acolor cartridge is mounted (prt_head_sts=COLOR), color_copy_d,color_copy_s, or color_copy_l is selected in accordance with the readdensity. Similarly, if a size-changeable color cartridge is mounted(prt_head_sts=COLOR_E), color_e_copy_d, color_e_copy_s, orcolor_e_copy_l is selected. If a photocartridge is mounted(prt_head_sts=PHOTO), photo_copy_d, photo_copy_s, or photo_copy_l isselected. If a size-changeable photocartridge is mounted(prt_head_sts=PHOTO_E), photo_e_copy_d, photo_e_copy_s, orphoto_e_copy_l is selected.

When the operation state is gray scale transmission or gray scalescanning, a conversion table “gray” is selected regardless of thecartridge mounting state and the read density.

When the operation state is gray scale copying, and no cartridge ismounted (prt_head_sts=NONE), gray scale copying cannot be performed, anda conversion table cannot be selected. If a cartridge is mounted,gray_copy_d, gray_copy_s, or gray_copy_l is selected in accordance withthe read density regardless of the type of cartridge.

When the operation state is monochrome transmission, mono_d, mono_s, ormono_l is selected in accordance with the read density.

When the operation state is monochrome scanning, mono_s is selectedregardless of the cartridge mounting state and the read density.

When the operation state is monochrome copying, and no cartridge ismounted (prt_head_sts=NONE), a photocartridge is mounted(prt_head_sts=PHOTO), or a size-changeable photocartridge is mounted(prt_head_sts=PHOTO_E), monochrome copying cannot be performed, and aconversion table cannot be selected. If a monochrome cartridge ismounted (prt_head_sts=MONO), a color cartridge is mounted(prt_head_sts=COLOR), or a size-changeable color cartridge is mounted(prt_head_sts=COLOR_E), mono_copy_d, mono_copy_s, or mono_copy_l isselected in accordance with the read density.

For monochrome copying, the conversion table may be changed inaccordance with the type of binarization (e.g., simple binarizationprocessing and pseudo halftone processing).

Processing in FIG. 17 will be explained.

Selection of the conversion table has been described. Data of a readmode stored in step S503 and data of a designated read density are readout (step S1701), and data of the type of cartridge is read out (stepS1702). A conversion table (luminance/density conversion table) isselected based on these parameters, and this information is set in theimage processor 105.

Whether the start key has been pressed is checked (step S1704). If YESin step S1704, the CPU 101 reads out a set compression method and colorspace representation format (step S1705). Further, the CPU 101 reads outa set buffer size or the like, and read width information (step S1706)so as to manage the line buffer 113 and control read by the readcontroller 111 in accordance with these parameters.

The sheet scanner 112 starts reading an image in accordance with the setparameters. Read images are sequentially transferred to the imageprocessor 105, subjected to image processing in accordance with theselected conversion table, and transferred to the line buffer 113managed by the set parameters (step S1707).

Then, an image is compressed in accordance with the designatedcompression mode. For JPEG, the color space is transformed in accordancewith the designated color space representation format, and the image iscompressed. If the image is not compressed, the flow skips thisprocessing. After the image is compressed, the image data is accumulatedin the RAM 103 (step S1709). For direct copying, the flow skipsaccumulation in the RAM 103. For FAX transmission (step S1710), theaccumulated image is transmitted in accordance with ITU-T T.30 (stepS1711). For copying (step S1712), the image is printed (step S1713). ForPC scanning (step S1713′), the read image is transferred to the PC (stepS1714). Otherwise, corresponding processing is done (step S1715), andthe flow ends.

As described above, a conversion table optimal for the read mode can beselected in accordance with the mounted cartridge to obtain an optimumoutput image.

In the above description, this apparatus is integrally constituted bythe communication controller, the printer, and the communication unit.However, the present invention is not limited to this. Alternatively,the scanner, the printer, and the communication unit may be separatelyconnected to a personal computer to construct a system including thepersonal computer, and may be controlled by the personal computer.

<Second Embodiment>

In the first embodiment, the image forming apparatus transmits andcopies image data by itself. When, however, the image forming apparatusis connected to the host computer 118, the image memory 104 of the imageforming apparatus is full, and memory copying, memory transmission, ormemory alternate reception is to be executed, a resource such as thehard disk or memory of the connected host computer 118 can be used formemory copying or transmission.

FIG. 16 is a flow chart showing a state in which a host computer 118monitors the state of an image memory 104 of an image forming apparatus,and switches between an operation instructed by the operator using theresource of the host computer 118 and an operation using only theresource of the image forming apparatus.

Upon reception of an operation instruction from the operator, whetherthe operation is an operation such as memory copying or memorytransmission using the image memory 104 is checked. If the operation isdetermined to use the image memory 104, the image forming apparatusinforms the host computer 118 of the state of the image memory 104.

If the host computer 118 determines that the image memory 104 is full,the instructed operation is performed using the resource of the hostcomputer 118. If the operation does not use the image memory 104, or theimage memory 104 is not full, the operation is performed using only theresource of the image forming apparatus.

For this purpose, commands for various communication operations areprepared between the image forming apparatus and the host computer 118.

For example, when printing sheets are used up during facsimilereception, out-of-paper memory reception must be executed. If the imagememory 104 becomes full while sequentially storing images, a CPU 101issues a data storage request command to the host computer 118 via a PCinterface 109. Upon reception of an acknowledge command, the CPU 101outputs received data to the host computer, and stores the data in theresource (e.g., hard disk) of the host computer 118 with a designatedfile name.

At this time, a table for managing image data for each received page iscreated in a RAM 103. FIG. 18 shows an example of the table.

One record is made up of page number information, informationrepresenting whether data is held by the self-terminal (image memory104) or the host computer 118 side, the compression format of imagedata, and the file name when image data is stored in the host computer118 or the storage address when the image data is stored in the imagememory 104.

After an error is canceled (in this case, printing sheets are setagain), image data are read out in units of pages in accordance with themanagement table, subjected to expansion processing corresponding totheir compression format, and printed by a printer 115. During thisprocessing, if the storage destination of the image of a target pageexists on the host computer 118 side, the file name is extracted fromthe table, added to a data transfer request command, and issued to thehost computer 118. As a result, the host computer transfers the data,and the image forming apparatus prints an image in accordance with thedata. Since the compression format of image data received from the hostcomputer is determined by referring to the table, data undergoesdecompression processing corresponding to the compression format.

The second embodiment has exemplified memory alternate reception. Thisoperation also applies to another processing such as memory copying ormemory transmission. Any processing can be coped with by a small numberof commands such as an image data storage request and a data transferrequest command to the host computer, which is obvious to those skilledin the art.

The present invention has been described by exemplifying a colorfacsimile apparatus (including an image read means and a printing means)connectable to a host computer. The present invention can also berealized by connecting a communication controller, an image scanner, anda printer to a host computer. The host computer suffices to be ageneral-purpose information processing apparatus such as a personalcomputer. Thus, the object of the present invention is achieved even bysupplying a storage medium (or a recording medium) storing softwareprogram codes for realizing the functions of the above-describedembodiments to a system or apparatus, and causing the computer (or a CPUor MPU) of the system or apparatus to read out and execute the programcodes stored in the storage medium.

In this case, the program codes read out from the storage medium realizethe functions of the above-described embodiments by themselves, and thestorage medium storing the program codes constitutes the presentinvention. The functions of the above-described embodiments are realizednot only when the computer executes the readout program codes but alsowhen the operating system (OS) running on the computer performs part orall of actual processing on the basis of the instructions of the programcodes.

The functions of the above-described embodiments are also realized whenthe program codes read out from the storage medium are written in thememory of a function expansion board inserted into the computer or afunction expansion unit connected to the computer, and the CPU of thefunction expansion board or function expansion unit performs part or allof actual processing on the basis of the instructions of the programcodes.

In the above embodiments, the luminance/density conversion tableincludes the functions of executing correction corresponding to thecharacteristics of a printhead, so that conversion processing can beefficiently achieved. Alternatively, these functions may be realized bydifferent conversion tables. The read mode includes three modes, color,gray scale, and monochrome modes, in the above embodiments, but mayinclude only two modes, color and monochrome modes.

According to the embodiments, an appropriate image data format can beselected in accordance with the read mode to determine the line buffersize and the line processing unit. Thus, image data can be efficientlyread without deterioration, and the line buffer area can be effectivelyused.

According to the embodiments, an appropriate image data format can beselected in accordance with intended use, realizing efficient readcontrol. Hence, the performance of the apparatus can be maximized.

Since a conversion table optimal for the read mode can be selected inaccordance with a printing member mounted on the printing unit, anoptimal output image can be obtained.

In the above embodiments, the color space is transformed into a YCbCrcolor space in copying (output destination is a printer) and scanning(output destination is a host computer). However, the present inventionis not limited to this, and may employ a color space which can betransformed more easily than the Lab color space.

As has been described above, the present invention realizes optimalcolor space transformation and compression in accordance with the outputdestination of compressed image data.

As has been described above, according to the present invention, animage can be formed with the highest quality in the apparatusenvironment by converting image data using an optimal conversion tablebased on the read mode and the type of printhead.

As many apparently widely different embodiments of the present inventioncan be made without departing from the spirit and scope thereof, it isto be understood that the invention is not limited to the specificembodiments thereof except as defined in the appended claims.

What is claimed is:
 1. An image forming apparatus comprising: read means capable of reading an original image as a color image; printing means which can mount one of a plurality of printhead units different from each other, and prints a read image, each of the printhead units including at least one printhead for discharging ink droplets; designation means for designating a read mode of said read means; determination means for determining the type of mounted printhead unit; and selection means for selecting a target conversion table from a plurality of conversion tables on the basis of the read mode designated by said designation means and the type of printhead unit determined by said determination means, wherein read image data is converted into printing image data on the basis of the target conversion table selected by said selection means, and the printing image data is printed by said printing means.
 2. The apparatus according to claim 1, wherein the read mode designated by said designation means includes a color read mode and a monochrome read mode.
 3. The apparatus according to claim 1, wherein the read mode designated by said designation means includes a mode concerning read density.
 4. The apparatus according to claim 1, wherein the printhead unit includes one of a monochrome printhead, a color printhead, a color printhead capable of discharging large and small ink droplets, a color printhead capable of discharging dark and light inks, and a color printhead capable of discharging dark and light inks and discharging large and small ink droplets.
 5. The apparatus according to claim 1, further comprising: transmission means for transmitting a read image by a facsimile; and output means for outputting the read image to an external information processing apparatus.
 6. The apparatus according to claim 1, wherein the conversion table includes a luminance/density conversion table, and gradation correction corresponding to the type of printhead is performed in addition to luminance/density conversion.
 7. A control method for an image forming apparatus having read means capable of reading an original image as a color image, and printing means which can mount one of a plurality of printhead units different from each other, and prints a read image, each of the printhead units including at least one printhead for discharging ink droplets, said control method comprising: a designation step of designating a read mode of the read means; a determination step of determining the type of mounted printhead unit; and a selection step of selecting a target conversion table from a plurality of conversion tables on the basis of the read mode designated in the designation step and the type of printhead unit determined in the determination step, wherein read image data is converted into printing image data on the basis of the target conversion table selected in the selection step, and the printing image data is printed by the printing means.
 8. A storage medium which stores program codes to be loaded and executed by a computer for controlling read means capable of reading an original image as a color image, and printing means which can mount one of a plurality of printhead units different from each other, and prints a read image, wherein each of the printhead units including at least one printhead for discharging ink droplets, said storage medium storing program codes of: a designation step of designating a read mode of the read means; a determination step of determining the type of mounted printhead unit; and a selection step of selecting a target conversion table from a plurality of conversion tables on the basis of the read mode designated in the designation step and the type of printhead unit determined in the determination step, wherein read image data is converted into printing image data on the basis of the target conversion table selected in the selection step, and the printing image data is printed by the printing means.
 9. An image forming apparatus comprising: read means for reading an original image as a color image; recording means which can mount either a recording unit for recording a monochrome image or a recording unit for recording a color image, and records the image read by said read means using one recording unit; designation means for designating a read mode of said read means; determination means for determining the type of mounted recording unit; selection means for selecting a conversion table from a plurality of conversion tables on the basis of the read mode designated by said designation means and the type of recording unit determined by said determination means; and control means for converting image data read by said read means into recording image data in accordance with the conversion table selected by said selection means and controlling said recording means to record the recording image data.
 10. The apparatus according to claim 9, wherein said determination means further determines whether the mounted recording unit is for recording a normal color image or recording a color image having high graduation.
 11. A control method for an image forming apparatus having reading means for reading an original image as a color image, and recording means which can mount either a recording unit for recording a monochrome image or a recording unit for recording a color image and records the read image, said method comprising: a designation step of designating a read mode of the read means; a determination step of determining the type of mounted recording unit; a selection step of selecting a conversion table from a plurality of conversion tables on the basis of the read mode designated at the designation step and the type of recording unit determined at the determination step; and a control step of converting image data read by the read means into recording image data in accordance with the conversion table selected at the selection step and controlling the recording means to record the recording image data.
 12. A storage medium which stores program codes to be loaded and executed by a computer for controlling reading means for reading an original image as a color image, and recording means which can mount either a recording unit for recording a monochrome image or a recording unit for recording a color image and records the read image, said medium storing program codes of: a designation step of designating a read mode of the read means; a determination step of determining the type of mounted recording unit; a selection step of selecting a conversion table from a plurality of conversion tables on the basis of the read mode designated at the designation step and the type of recording unit determined at the determination step; and a control step of converting image data read by the read means into recording image data in accordance with the conversion table selected at the selection step and controlling the recording means to record the recording image data. 